// Copyright 2017-2018 Filmstorm Pty Ltd - All Rights Reserved.
#include "FunctionDelegator.h"

//Custom Helper Struct to perform a specific action for Bone calculations
float FSkeletonStructure::CompareTo(const FSkeletonStructure RPData) const
{
	return (FVector::Dist(BoneTransformPosition, RPData.BoneTransformPosition)) + (FVector::Dist(BoneTransformVelocity, RPData.BoneTransformVelocity));
}

float FInputPlayerDirectionData::CompareTo(const FInputPlayerDirectionData RPData, const int Per) const
{
	float Cost = 0.f;
	
	if ((DirectionalPointsArray.Num() > 0) && (DirectionalPointsArray.Num() == RPData.DirectionalPointsArray.Num()))
	{
		Cost += FVector::Dist(DirectionalPointsArray.Last().CurrentRefTransform.GetTranslation(), RPData.DirectionalPointsArray.Last().CurrentRefTransform.GetTranslation());
	}

	return Cost;
}

//Filmstorm